<script setup lang='ts'>
import { provide, ref } from 'vue';
import Father from './16_跨代传值的爸爸组件.vue'
const salary = ref(10000)
provide('money',salary)
provide('cost',(costMoney:number)=>{
    salary.value -= costMoney
})
</script>

<template>
    <h1>我是爷爷</h1>
    <p>爷爷的退休金{{ salary }}</p>
    <Father></Father>
</template>

<style scoped></style>